package com.wn.web.FileControllerPackage;

import com.wn.common.pojo.Rsp;
import com.wn.service.FileServicePackage.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@CrossOrigin
@RestController
@RequestMapping("file")
public class FileController {

    @Autowired
    private FileService fileService;

    @PostMapping("uploadImage")
    public Rsp uploadImage(@RequestParam("image") MultipartFile image) {

        return fileService.uploadImage(image);

    }


}
